package widok;

import kontroler.Presenter;
import model.WorkerTableModel;

import javax.swing.*;

/**
 * Author: Daniel
 * Date: 16.09.13
 */

public class SrodkowyPanel extends JPanel {

    private JTable table;

    public SrodkowyPanel(Presenter presenter) {
        WorkerTableModel tableModel = new WorkerTableModel(presenter.odczytajDaneZPliku());
        table = new JTable(tableModel);
        JScrollPane scrollPane = new JScrollPane(table);
        add(scrollPane);
    }

    public JTable getTable() {
        return table;
    }
}
